package main.java.com.ThinkInJava.Chapter21并发._21_5_3生产者与消费者;


import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

public class Restaurant {
    Meal meal;
    ExecutorService exec = Executors.newCachedThreadPool();
    WaitPersion waitPersion = new WaitPersion(this);
    Chef chef = new Chef(this);

    public Restaurant(){
        exec.execute(chef);
        exec.execute(waitPersion);
    }
    public static void main(String[] args) {
        new Restaurant();
    }

}